package structural.adaptor;

/**
 * @author binbin
 * @since 2022/10/7 16:14
 */
public class UGreenVoltageAdaptor extends VoltageAdaptor {

    private American110VSupplier american110VSupplier = new American110VSupplier();

    private Chinese220VSupplier chinese220VSupplier = new Chinese220VSupplier();

    @Override
    public Voltage v110ToV220() {
        Voltage voltage = american110VSupplier.supply110V();
        voltage.setV(220);
        return voltage;
    }

    @Override
    public Voltage v220ToV110() {
        Voltage voltage = chinese220VSupplier.supply220V();
        voltage.setV(110);
        return voltage;
    }

    @Override
    public Voltage v220ToV5() {
        Voltage voltage = chinese220VSupplier.supply220V();
        voltage.setV(5);
        return voltage;
    }
}
